package hn.cch.service;

import hn.cch.entity.User;
import hn.cch.fallback.UserFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

// 容错回调fallback和fallbackFactory只能使用一个
@FeignClient(value = "shop-user"
        , fallbackFactory = UserFallbackFactory.class
)
public interface UserService {

    @GetMapping(value = "user/getOne/{id}")
    public User getOne(@PathVariable Integer id);


}
